applyAsset

open suspend fun applyAsset(asset: Asset): DesignBlock?

Custom implementation of applying asset to the active scene. It is required to override this method only in case the asset needs to be applied differently compared to ly.img.engine.AssetApi.defaultApplyAsset. Implementation can be invoked via ly.img.engine.AssetApi.applyAssetSourceAsset where sourceId should be the sourceId of this AssetSource. If no custom implementation is provided, ly.img.engine.AssetApi.applyAssetSourceAsset will invoke ly.img.engine.AssetApi.defaultApplyAsset instead.

Return

the newly created block or null if no new block is created.

Parameters

asset

the asset that should be applied


open suspend fun applyAsset(asset: Asset, block: DesignBlock)

Custom implementation of applying asset to an existing block. It is required to override this method only in case the asset needs to be applied differently compared to ly.img.engine.AssetApi.defaultApplyAsset. Implementation can be invoked via ly.img.engine.AssetApi.applyAssetSourceAsset where sourceId should be the sourceId of this AssetSource. If no custom implementation is provided, ly.img.engine.AssetApi.applyAssetSourceAsset will invoke ly.img.engine.AssetApi.defaultApplyAsset instead.

Parameters

asset

the asset that should be applied

block

the block to which asset should be applied